From 74517de10474ba9cabca6ed1c68dff94b24000c1 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 29 Nov 2006 12:16:59 +0000 Subject: [PATCH] [LINUX] Avoid triggering the softlockup BUG when offline for too long. After being offline for a long time, the softlockup watchdog triggers a BUG() on our faces. This is expected, as in fact, we spent more than a fixed 10*HZ amount of time without touching the watchdog. However, by inspecting the contents of stolen inside timer irq handler, we can gain awareness of the fact, and do better than that. Signed-off-by: Glauber de Oliveira Costa --- linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c index 05f3c47e50..93388ea67a 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c @@ -710,6 +710,10 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) (cputime_t)delta_cpu); } + /* Offlined for more than a few seconds? Avoid lockup warnings. */ + if (stolen > 5*HZ) + touch_softlockup_watchdog(); + /* Local timer processing (see update_process_times()). */ run_local_timers(); if (rcu_pending(cpu)) -- 2.30.2